public class MonthlyReport {
    private int month;
    private double budgetLimit;
    private double totalIncome;
    private double totalExpense;
    private String details;

    public MonthlyReport(int month, double budgetLimit, double totalIncome, double totalExpense, String details) {
        this.month = month;
        this.budgetLimit = budgetLimit;
        this.totalIncome = totalIncome;
        this.totalExpense = totalExpense;
        this.details = details;
    }

    @Override
    public String toString() {
        return String.format(
            "\n=== %d月份收支报告 ===\n" +
            "月度预算：%.2f\n" +
            "总收入：%.2f\n" +
            "总支出：%.2f\n" +
            "结余：%.2f\n" +
            "预算剩余：%.2f" +
            "%s\n" +
            "====================",
            month, budgetLimit, totalIncome, totalExpense,
            totalIncome - totalExpense,
            budgetLimit - totalExpense,
            details
        );
    }
} 